import router from '@r/index.js'
import ElementPlus, { ElMessage } from 'element-plus'
import 'element-plus/dist/index.css'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'normalize.css/normalize.css'
import { createApp } from 'vue'
import App from './App.vue'
import './assets/iconfont/iconfont.css'
import './assets/iconfont/iconfont.js'
import i18 from './i18'
import pinia from './store/pinia'
import customDirectives from './utils/custom-directives'

window.$elMessage = ElMessage

const app = createApp(App)
app.use(pinia)

app.use(ElementPlus)

Object.keys(customDirectives).forEach(key => {
  app.directive(key, customDirectives[key])
})
app.use(router)
app.use(i18)
app.mount('#app')
